<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>catch</title>
</head>

<body>
  <script src="./Promise.js"></script>
  <script>
    // let p = Promise.resolve('ok');
    // let p = Promise.resolve(new Promise((resolve, reject) => {
    //   reject('error');
    // }));
    // let p = Promise.resolve(Promise.resolve(Promise.resolve('YES')));

    // var p = Promise.reject(404);
    var p = Promise.reject(new Promise((resolve, reject) => {
      resolve('OK');
    }));

    console.log(p);
  </script>
</body>

</html>